package com.bbs.service;

import cn.hutool.db.PageResult;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bbs.dto.MyPageResult;
import com.bbs.dto.PostDTO;
import com.bbs.dto.PostPageQueryDTO;
import com.bbs.dto.Result;
import com.bbs.entity.Post;
import com.bbs.vo.PostVO;

import java.util.List;

public interface PostService extends IService<Post> {
    Result queryPostOfFollow(Long max, Integer offset);

    PostVO createPost(PostDTO postDTO);
    PostVO getPostById(Long id);
    List<PostVO> getAllPosts();
    PostVO updatePost(Long id, PostDTO postDTO);
    void deletePost(Long id);
    List<PostVO> getPostsByUserId(Long userId);
    void incrementViewCount(Long id);
    Result getTOP5LikeByPostId(Long id);

    MyPageResult<PostVO> pageQuery(PostPageQueryDTO postPageQueryDTO);

    Result updateViewCount(Long id, Integer num);
}